<?php
session_start();
include_once 'classes/DBCon.php';
include_once 'classes/Conversation.php';
?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Railway Official Website</title>
        <link rel="stylesheet" href="css/foundation.css"/>
        <link rel="stylesheet" href="css/normalize.css"/>
        <link rel="stylesheet" href="css/jquery-ui.css" />
        <script src="js/vendor/jquery.js"></script>
        <script src="js/ui/jquery-ui.js"></script>
        <script src="js/vendor/custom.modernizr.js"></script>
        <script src="js/forum.js"></script>
        <style type="text/css">
		#wrap {display:table;height:100%}
        fieldset { border:2px solid grey }
        legend {
              padding: 0.2em 0.5em;
              border:2px solid white;
              color:black;
              font-size:150%;
              text-align:left;
        }
	</style>
        


    </head>
    <body bgcolor="transparent">
        
        <div>
            <nav class="top-bar">
                <ul class="title-area">
                    <li class="name" onClick="void(0);">
                        <h1><a href="ForumMain.php">Railway Community Forum</a></h1>
                    </li>
                    <li class="divider"></li>
                    <li class="toggle-topbar menu-icon">
                        <a href="#"><span>menu</span></a>
                    </li>
                </ul>
                <section class="top-bar-section">
                    <ul class="right">
                        <li class="divider"></li>
                        <li><a href="index.php">Home</a></li>
                        <li class="divider"></li>
                        <?php
                        if (isset($_SESSION['username'])) {
                            echo '<li><a href="profile.php">Welcome, ' . $_SESSION['username'] . '!</a></li>';
                            echo '<li class="divider"></li>';
                            echo '<li><a href="logout.php">Logout</a></li>';
                            echo '<li class="divider"></li>';
                        }
                        else{
                            echo '<li><a href="loginPage.php">Login</a></li>';
                            echo '<li class="divider"></li>';
                            echo '<li><a href="register.php">Register</a></li>';
                            echo '<li class=divider"></li>';
                        }
                        ?>
                    </ul>
                </section>
            </nav>
        </div>
    <body>
        <?php
        $c = new Conversation();
        if($c->newReply('heyhey', 4, 2)){
            echo 'true';
        }else{
            echo 'false';
        }
        
        ?>
    </body>
</html>
